$(document).ready(
                function() {


                    $('#contact-form').validate(
                            {
                                rules: {
                                    titulo: {
                                        minlength: 2,
                                        required: true
                                    },
                                    tipo: {
                                        required: true,
                                    },
                                    modelo: {
                                        required: true
                                    },
                                    marca: {
                                        required: true
                                    },
                                    anio: {
                                        minlength: 4,
                                        required: true
                                    },
                                    kilometraje: {
                                        required: true

                                    },
                                    transmision: {
                                        required: true
                                    },
                                    combustible: {
                                        required: true
                                    },
                                    descripcion: {
                                        minlength: 2,
                                        required: true
                                    },
                                    precio: {
                                        required: true,
                                       
                                        
                                    }

                                },
                                highlight: function(element) {
                                    $(element).closest('.control-group')
                                            .removeClass('success').addClass(
                                            'error');
                                },
                                success: function(element) {
                                    element.text('OK!').addClass('valid')
                                            .closest('.control-group')
                                            .removeClass('error').addClass(
                                            'success');
                                }
                            });
                }); // end document.ready